package com.syw.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.syw.dao.CashierDao;
import com.syw.entity.SywCustomer;
import com.syw.entity.SywProjectrecord;
import com.syw.service.CashierService;
import com.syw.util.Cashier;
import com.syw.util.Project;

@Service("cashierService")
public class CashierServiceImpl implements CashierService {
	@Autowired
	private CashierDao cashierDao;
	@Override
	public List<SywCustomer> findCustomer(Cashier ca) {
		// TODO Auto-generated method stub
		return cashierDao.findCustomer( ca);
	}

	@Override
	public List<Cashier> findProjectrecord(Cashier ca) {
		// TODO Auto-generated method stub
		List<Cashier> list=cashierDao.findProjectrecord(this.findCustomer(ca));
		return list;
	}

	@Override
	public List<SywProjectrecord> findProject(Cashier cashier) {
		// TODO Auto-generated method stub
		return cashierDao.findProject(cashier);
	}

	@Override
	public void updatecust(Cashier cashier) {
		// TODO Auto-generated method stub
		cashierDao.updatecust(cashier);
	}

	@Override
	public List<Cashier> findProjectrecordyjz(Cashier ca) {
		// TODO Auto-generated method stub
		return cashierDao.findProjectrecordyjz(this.findCustomeryzj(ca));
	}

	@Override
	public List<SywCustomer> findCustomeryzj(Cashier ca) {
		// TODO Auto-generated method stub
		return cashierDao.findCustomeryjz(ca);
	}
}
